/* jshint indent: 2 */

module.exports = function(sequelize, DataTypes) {
  return sequelize.define('iframe_platform_rule', {
    RuleID: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      primaryKey: true,
      autoIncrement: true
    },
    RuleName: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    RuleInfo: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    RuleDict: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    RuleAble: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    RulePlatformID: {
      type: DataTypes.INTEGER(11),
      allowNull: true,
      defaultValue: '0',
      references: {
        model: 'iframe_platform',
        key: 'IP_ID'
      }
    },
    CreateTime: {
      type: DataTypes.DATE,
      allowNull: true
    },
    IsDel: {
      type: DataTypes.INTEGER(6),
      allowNull: true,
      defaultValue: '0'
    }
  }, {
    tableName: 'iframe_platform_rule'
  });
};
